﻿USE WarehouseManagement
GO

CREATE PROCEDURE InsertAccount
(
@EmployeeID int = NULL,
@Username nvarchar(MAX),
@Password nvarchar(MAX)
)
AS
BEGIN
	IF (EXISTS (SELECT 1 FROM [Employee] WHERE [EmployeeID]=@EmployeeID))
	BEGIN
		INSERT INTO [Account] ([EmployeeID], [Username], [Password])
		VALUES (@EmployeeID, @Username, @Password)
	END
END